#ifndef XPCOM_DETAIL_ATOMIC_COUNT_HPP
#define XPCOM_DETAIL_ATOMIC_COUNT_HPP

#include <xpcom/config.hpp>
#include <boost/version.hpp>

// From boost version 1.39.0, boost::detail::atomic_count returns its value for
// operator++, so use it directly. Otherwise use our cloned version.
#if BOOST_VERSION >= 103900

#include <boost/detail/atomic_count.hpp>

namespace xpcom {
namespace detail {

using boost::detail::atomic_count;

} // namespace xpcom::detail
} // namespace xpcom

#else // BOOST_VERSION < 103900

#include <xpcom/detail/atomic_count/atomic_count.hpp>

#endif // BOOST_VERSION

#endif // XPCOM_DETAIL_ATOMIC_COUNT_HPP
